home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacApp Release 10 / MacApp Release 10 - HD Ready / Examples / SimpleContainer / UContainerDocument.h < prev    next >
Encoding:
Text File  |  1996-04-03  |  1.6 KB  |  63 lines  |  [TEXT/MPS ]

  1. // UContainerDocument.h
  2. // Copyright © 1996 by Apple Computer, Inc. All rights reserved. 
  3.  
  4. #ifndef __UContainerDocument__
  5. #define __UContainerDocument__
  6.  
  7. #ifndef __UFILEBASEDDOCUMENT__
  8. #include "UFileBasedDocument.h"
  9. #endif
  10.  
  11.  
  12. class TODPartView;
  13.  
  14. //----------------------------------------------------------------------------------------
  15. // Constants
  16. //----------------------------------------------------------------------------------------
  17.  
  18. // Files
  19. const OSType kFileType = 'SF01';    
  20.  
  21. //----------------------------------------------------------------------------------------
  22. // TContainerDocument
  23. //----------------------------------------------------------------------------------------
  24.  
  25. class TContainerDocument: public TFileBasedDocument
  26. {
  27.     MA_DECLARE_CLASS;
  28.     
  29.   public:
  30.       TODPartView*    fODPartView;
  31.       TRadio*            fFrameRadioButton;
  32.       TRadio*            fViewRadioButton;
  33.       
  34.     TContainerDocument(); 
  35.         // Constructor
  36.     
  37.     virtual ~TContainerDocument();
  38.         // Destructor
  39.     
  40.     virtual void  IContainerDocument(TFile* itsFile, OSType itsCreator);
  41.     virtual void  DoInitialState(); 
  42.     virtual void  FreeData(); 
  43.             
  44.     // Views
  45.     virtual void  DoMakeViews(Boolean forPrinting);
  46.     virtual void  CloseWindow(TWindow* aWindow); 
  47.     
  48.     // Commands
  49.     virtual void  DoSetupMenus(); 
  50.     virtual void  DoMenuCommand(CommandNumber aCommandNumber); 
  51.  
  52.     // Saving and Restoring
  53.     virtual void  DoNeedDiskSpace(TFile* itsFile,
  54.                                   long& dataForkBytes,
  55.                                   long& rsrcForkBytes);
  56.     virtual void  DoRead(TFile* aFile,
  57.                          Boolean forPrinting); 
  58.     virtual void  DoWrite(TFile* aFile,
  59.                           Boolean makingCopy);
  60. };
  61.  
  62. #endif
  63.